<template>
	<view class="center">
		<view class="centeritem" v-for="(item,index) in dataList" @click="handledetail(item)" >
			<view class="left">
				{{item.title}}
			</view>
			<image src="../../static/image/right.png" mode="" style="width: 14.88rpx;height: 26.52rpx;"></image>
		</view>
	</view>
	
</template>

<script>
	import{problem} from "@/api/api.js"
	export default{
		data(){
			return{
				dataList:[],
			}
		},
		onLoad() {
			if (!uni.getStorageSync("token")) {
				uni.reLaunch({
					url: "../login/index"
				})
				return
			}
			this.handleGetproblem()
		},
		methods:{
			async handleGetproblem(){
				let res = await problem()
				console.log("问题列表",res)
				this.dataList = res.data
			},
			handledetail(item){
				uni.navigateTo({
					url:`./helpdetail?id=${item.id}`
				})
			}
		}
	}
</script>

<style scoped lang="scss">
	.center{
		padding: 0 30rpx;
		box-sizing: border-box;
		.centeritem{
			width: 100%;
			height: 76rpx;
			background: #FFFFFF;
			border-radius: 6rpx 6rpx 6rpx 6rpx;
			padding: 16rpx 30rpx;
			box-sizing: border-box;
			display: flex;
			justify-content: space-between;
			align-items: center;
			font-size: 30rpx;
			font-family: PingFang SC-Medium, PingFang SC;
			font-weight: 400;
			color: #333333;
			margin-bottom: 16rpx;
		}
	}
</style>